package action;

import java.util.LinkedHashMap;

public abstract class CommandResponse {

	private final LinkedHashMap<String, Object> hash;
	
	public CommandResponse(){
		this.hash = new LinkedHashMap<String, Object>();
	}
	
	public CommandResponse(String key, Object object){
		LinkedHashMap<String, Object> hash = new LinkedHashMap<String, Object>();
		hash.put(key, object);
		this.hash = hash;
	}
	
	public CommandResponse(LinkedHashMap<String, Object> hash){
		this.hash = hash;
	}
	
	public LinkedHashMap<String, Object> getHash() {
		return hash;
	}
	
	public abstract void respond();
	
	public static CommandResponse defaut()
	{
		return new CommandResponse() {
			
			@Override
			public void respond() {
				// does nothing.
			}
		};
	}
}
